<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var hero = prompt('请输入你的英雄');
        var level = prompt('请输入英雄等级');
        // prompt 得到的数据都是 string 类型
        console.log(typeof level);
        console.log(hero + "现在" + level + "级了");
    </script>
</body>

</html>